Integrand size = 27, antiderivative size = 201 \[ \int \left (c (d \tan (e+f x))^p\right )^n (a+b \tan (e+f x))^m \, dx=\frac {\operatorname {AppellF1}\left (1+n p,-m,1,2+n p,-\frac {b \tan (e+f x)}{a},-i \tan (e+f x)\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n (a+b \tan (e+f x))^m \left (1+\frac {b \tan (e+f x)}{a}\right )^{-m}}{2 f (1+n p)}+\frac {\operatorname {AppellF1}\left (1+n p,-m,1,2+n p,-\frac {b \tan (e+f x)}{a},i \tan (e+f x)\right ) \tan (e+f x) \left (c (d \tan (e+f x))^p\right )^n (a+b \tan (e+f x))^m \left (1+\frac {b \tan (e+f x)}{a}\right )^{-m}}{2 f (1+n p)} \]
1/2*AppellF1(n*p+1,1,-m,n*p+2,-I*tan(f*x+e),-b*tan(f*x+e)/a)*tan(f*x+e)*(c *(d*tan(f*x+e))^p)^n*(a+b*tan(f*x+e))^m/f/(n*p+1)/((1+b*tan(f*x+e)/a)^m)+1 /2*AppellF1(n*p+1,1,-m,n*p+2,I*tan(f*x+e),-b*tan(f*x+e)/a)*tan(f*x+e)*(c*( d*tan(f*x+e))^p)^n*(a+b*tan(f*x+e))^m/f/(n*p+1)/((1+b*tan(f*x+e)/a)^m)
\[ \int \left (c (d \tan (e+f x))^p\right )^n (a+b \tan (e+f x))^m \, dx=\int \left (c (d \tan (e+f x))^p\right )^n (a+b \tan (e+f x))^m \, dx \]
Time = 0.50 (sec) , antiderivative size = 220, normalized size of antiderivative = 1.09, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {3042, 4061, 3042, 4058, 615, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a+b \tan (e+f x))^m \left (c (d \tan (e+f x))^p\right )^n \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+b \tan (e+f x))^m \left (c (d \tan (e+f x))^p\right )^ndx\) |
\(\Big \downarrow \) 4061 |
\(\displaystyle (d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n \int (d \tan (e+f x))^{n p} (a+b \tan (e+f x))^mdx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n \int (d \tan (e+f x))^{n p} (a+b \tan (e+f x))^mdx\) |
\(\Big \downarrow \) 4058 |
\(\displaystyle \frac {(d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n \int \frac {(d \tan (e+f x))^{n p} (a+b \tan (e+f x))^m}{\tan ^2(e+f x)+1}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 615 |
\(\displaystyle \frac {(d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n \int \left (\frac {i (d \tan (e+f x))^{n p} (a+b \tan (e+f x))^m}{2 (i-\tan (e+f x))}+\frac {i (d \tan (e+f x))^{n p} (a+b \tan (e+f x))^m}{2 (\tan (e+f x)+i)}\right )d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {(d \tan (e+f x))^{-n p} \left (c (d \tan (e+f x))^p\right )^n \left (\frac {(a+b \tan (e+f x))^m \left (\frac {b \tan (e+f x)}{a}+1\right )^{-m} (d \tan (e+f x))^{n p+1} \operatorname {AppellF1}\left (n p+1,-m,1,n p+2,-\frac {b \tan (e+f x)}{a},-i \tan (e+f x)\right )}{2 d (n p+1)}+\frac {(a+b \tan (e+f x))^m \left (\frac {b \tan (e+f x)}{a}+1\right )^{-m} (d \tan (e+f x))^{n p+1} \operatorname {AppellF1}\left (n p+1,-m,1,n p+2,-\frac {b \tan (e+f x)}{a},i \tan (e+f x)\right )}{2 d (n p+1)}\right )}{f}\) |
((c*(d*Tan[e + f*x])^p)^n*((AppellF1[1 + n*p, -m, 1, 2 + n*p, -((b*Tan[e + f*x])/a), (-I)*Tan[e + f*x]]*(d*Tan[e + f*x])^(1 + n*p)*(a + b*Tan[e + f* x])^m)/(2*d*(1 + n*p)*(1 + (b*Tan[e + f*x])/a)^m) + (AppellF1[1 + n*p, -m, 1, 2 + n*p, -((b*Tan[e + f*x])/a), I*Tan[e + f*x]]*(d*Tan[e + f*x])^(1 + n*p)*(a + b*Tan[e + f*x])^m)/(2*d*(1 + n*p)*(1 + (b*Tan[e + f*x])/a)^m)))/ (f*(d*Tan[e + f*x])^(n*p))
3.14.23.3.1 Defintions of rubi rules used
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && ILtQ[p, 0]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, S imp[ff/f Subst[Int[(a + b*ff*x)^m*((c + d*ff*x)^n/(1 + ff^2*x^2)), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && NeQ[b*c - a *d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]
Int[((c_.)*((d_.)*tan[(e_.) + (f_.)*(x_)])^(p_))^(n_)*((a_.) + (b_.)*tan[(e _.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Simp[c^IntPart[n]*((c*(d*Tan[e + f*x ])^p)^FracPart[n]/(d*Tan[e + f*x])^(p*FracPart[n])) Int[(a + b*Tan[e + f* x])^m*(d*Tan[e + f*x])^(n*p), x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && !IntegerQ[n] && !IntegerQ[m]
\[\int \left (c \left (d \tan \left (f x +e \right )\right )^{p}\right )^{n} \left (a +b \tan \left (f x +e \right )\right )^{m}d x\]
\[ \int \left (c (d \tan (e+f x))^p\right )^n (a+b \tan (e+f x))^m \, dx=\int { \left (\left (d \tan \left (f x + e\right )\right )^{p} c\right )^{n} {\left (b \tan \left (f x + e\right ) + a\right )}^{m} \,d x } \]
\[ \int \left (c (d \tan (e+f x))^p\right )^n (a+b \tan (e+f x))^m \, dx=\int \left (c \left (d \tan {\left (e + f x \right )}\right )^{p}\right )^{n} \left (a + b \tan {\left (e + f x \right )}\right )^{m}\, dx \]
\[ \int \left (c (d \tan (e+f x))^p\right )^n (a+b \tan (e+f x))^m \, dx=\int { \left (\left (d \tan \left (f x + e\right )\right )^{p} c\right )^{n} {\left (b \tan \left (f x + e\right ) + a\right )}^{m} \,d x } \]
\[ \int \left (c (d \tan (e+f x))^p\right )^n (a+b \tan (e+f x))^m \, dx=\int { \left (\left (d \tan \left (f x + e\right )\right )^{p} c\right )^{n} {\left (b \tan \left (f x + e\right ) + a\right )}^{m} \,d x } \]
Timed out. \[ \int \left (c (d \tan (e+f x))^p\right )^n (a+b \tan (e+f x))^m \, dx=\int {\left (c\,{\left (d\,\mathrm {tan}\left (e+f\,x\right )\right )}^p\right )}^n\,{\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )}^m \,d x \]